// 导航菜单控制
function toggleMenu() {
    const menu = document.querySelector('.nav-menu');
    const toggle = document.querySelector('.menu-toggle');
    
    menu.classList.toggle('active');
    toggle.classList.toggle('active');
    
    // 点击外部关闭菜单
    function closeMenu(e) {
        if (!menu.contains(e.target) && !toggle.contains(e.target)) {
            menu.classList.remove('active');
            toggle.classList.remove('active');
            document.removeEventListener('click', closeMenu);
        }
    }
    
    setTimeout(() => {
        document.addEventListener('click', closeMenu);
    }, 0);
}

// 语言切换功能
function changeLanguage(lang) {
    console.log(`Changing language to: ${lang}`);
    // 实现语言切换逻辑
} 